<template>
  <a-config-provider :locale="locale">
    <router-view v-slot="{ Component }" style="position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;">
      <transition name="slide-fade">
        <component :is="Component" />
      </transition>
    </router-view>
  </a-config-provider>
</template>

<script>
  import zhCN from 'ant-design-vue/es/locale/zh_CN';

  export default {
    setup(){

      return {
        locale: zhCN,
      }
    }
  }
</script>

<style lang="less">

@import '~ant-design-vue/dist/antd.less'; // 引入官方提供的 less 样式入口文件
@import './my-theme-file.less'; // 用于覆盖上面定义的变量

body{
  overflow: hidden;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100%;
  width: 100%;
  position: relative;
}

.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(20px);
  opacity: 0;
}

</style>
